var TimeDelayTrigger = function (opts) {
    this.delay = opts.delay || 30000;
};

module.exports = TimeDelayTrigger;

TimeDelayTrigger.prototype.run = function (cb) {
    this.intervalId = setTimeout(cb, this.delay);
};

TimeDelayTrigger.prototype.close = function () {
    clearTimeout(this.intervalId);
};